-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V0/topic/nfsboot #1
Open
ejoerns
wants to merge
1
commit into
master
Choose a base branch
from
v0/topic/nfsboot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If no valid boot source was found matching any of the known slot entries, add a pseudo slot entry for nfs to the list of slots and set it `booted`. Signed-off-by: Enrico Jorns <[email protected]>
3278046
to
78f7098
Compare
ejoerns
added a commit
that referenced
this pull request
Nov 9, 2021
During manifest file parsing, we ensure that filename is set and allow an unset filename only for an install hook. Thus having filename unset after checking this conditition is a programming error here. Check it with g_assert_nonnull(). Fixes coverity warning: | CID 1465767 (#1 of 1): Dereference after null check (FORWARD_NULL) | 20. var_deref_model: Passing null pointer mfimage->filename to g_file_test, which dereferences it. Fixes 8a9c921 which added this check: + /* skip source image checks if filename is not set (install hook) */ + if (!mfimage->filename && mfimage->hooks.install) + goto skip_filename_checks; + that lets coverity assume we explicitly pass here in case of mfimage->filename being null: | 17. var_compare_op: Comparing mfimage->filename to null implies that mfimage->filename might be null. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Nov 9, 2021
During manifest file parsing, we ensure that filename is set and allow an unset filename only for an install hook. Thus having filename unset after checking this conditition is a programming error here. Split the prior single condition into two and check the unexpected case with g_assert_not_reached() to signal that reaching this must be a programming error. Fixes coverity warning: | CID 1465767 (#1 of 1): Dereference after null check (FORWARD_NULL) | 20. var_deref_model: Passing null pointer mfimage->filename to g_file_test, which dereferences it. Fixes 8a9c921 which added this check: + /* skip source image checks if filename is not set (install hook) */ + if (!mfimage->filename && mfimage->hooks.install) + goto skip_filename_checks; + that lets coverity assume we explicitly pass here in case of mfimage->filename being null: | 17. var_compare_op: Comparing mfimage->filename to null implies that mfimage->filename might be null. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 1, 2022
The char pointer array 'groups' is freed manually with g_strfreev. It is not freed in case of an error and a jump to the 'free:' label. Fixes coverity issue: | CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK) | 17. leaked_storage: Variable groups going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 1, 2022
Fixes coverity issue: | CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 1, 2022
The variable 'string' will not be freed on error. Use g_autoptr to automatically free 'string' and use this to simplify code. Fixes coverity issue: | CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable string going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 1, 2022
The binary data returned by r_hex_decode() is not freed. Fix it. Fixes coverity issue: | CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK) | 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.
ejoerns
added a commit
that referenced
this pull request
Mar 1, 2022
When jumping to free: label, g_strfreev() will not be called. Use g_autoptr() instead. Fixes coverity issue: | CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK) | 47. leaked_storage: Variable groups going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The char pointer array 'groups' is freed manually with g_strfreev. It is not freed in case of an error and a jump to the 'free:' label. Fixes coverity issue: | CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK) | 17. leaked_storage: Variable groups going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
Fixes coverity issue: | CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The variable 'string' will not be freed on error. Use g_autoptr to automatically free 'string' and use this to simplify code. Fixes coverity issue: | CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable string going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it. Fixes coverity issue: | CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK) | 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called. Use g_autoptr() instead. Fixes coverity issue: | CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK) | 47. leaked_storage: Variable groups going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The char pointer array 'groups' is freed manually with g_strfreev. It is not freed in case of an error and a jump to the 'free:' label. Fixes coverity issue: | CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK) | 17. leaked_storage: Variable groups going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
Fixes coverity issue: | CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The variable 'string' will not be freed on error. Use g_autoptr to automatically free 'string' and use this to simplify code. Fixes coverity issue: | CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable string going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it. Fixes coverity issue: | CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK) | 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called. Use g_autoptr() instead. Fixes coverity issue: | CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK) | 47. leaked_storage: Variable groups going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The char pointer array 'groups' is freed manually with g_strfreev. It is not freed in case of an error and a jump to the 'free:' label. Fixes coverity issue: | CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK) | 17. leaked_storage: Variable groups going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
Fixes coverity issue: | CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The variable 'string' will not be freed on error. Use g_autoptr to automatically free 'string' and use this to simplify code. Fixes coverity issue: | CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable string going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it. Fixes coverity issue: | CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK) | 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called. Use g_autoptr() instead. Fixes coverity issue: | CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK) | 47. leaked_storage: Variable groups going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
Fixes coverity issue: | CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The variable 'string' will not be freed on error. Use g_autoptr to automatically free 'string' and use this to simplify code. Fixes coverity issue: | CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK) | 7. leaked_storage: Variable string going out of scope leaks the storage it points to Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it. Fixes coverity issue: | CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK) | 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called. Use g_autoptr() instead. Fixes coverity issue: | CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK) | 47. leaked_storage: Variable groups going out of scope leaks the storage it points to. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 3, 2022
Fixes defect reported by coverity: | CID 1475713 (#1 of 1): Unused value (UNUSED_VALUE) | assigned_value: Assigning value 1.79769e+308 to stats->min here, but that stored value is overwritten before it can be used. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
added a commit
that referenced
this pull request
Mar 17, 2022
Fixes defect reported by coverity: | CID 1475713 (#1 of 1): Unused value (UNUSED_VALUE) | assigned_value: Assigning value 1.79769e+308 to stats->min here, but that stored value is overwritten before it can be used. This also fixes 'min' calculation as 'min' was already set to the smalles possible value and thus could not be decreased. Signed-off-by: Enrico Joerns <[email protected]>
ejoerns
pushed a commit
that referenced
this pull request
Jan 28, 2025
This fixes an error leaking if error happen in r_nbd_run_server(). Fixes: ==7101==ERROR: LeakSanitizer: detected memory leaks Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fb183cd0891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7fb18379314a in g_malloc (/usr/lib/libglib-2.0.so.0+0x6314a) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) #2 0x7fb1837b2475 in g_slice_alloc0 (/usr/lib/libglib-2.0.so.0+0x82475) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) #3 0x7fb1837740a4 (/usr/lib/libglib-2.0.so.0+0x440a4) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#4 0x7fb183774835 in g_error_new_valist (/usr/lib/libglib-2.0.so.0+0x44835) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#5 0x7fb183774a81 in g_set_error (/usr/lib/libglib-2.0.so.0+0x44a81) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#6 0x55c569403615 in r_nbd_run_server ../src/nbd.c:943 rauc#7 0x55c569327de4 in main ../src/main.c:2984 rauc#8 0x7fb182a0ce07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#9 0x7fb182a0cecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#10 0x55c5692eed14 in _start (/home/gportay/src/rauc/build/rauc+0x17ad14) (BuildId: fce67367819006bb3a0f97f5d3784a86063668bf) Indirect leak of 37 byte(s) in 1 object(s) allocated from: #0 0x7fb183cd0891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7fb182a6f438 (/usr/lib/libc.so.6+0x88438) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) #2 0x7fb1837e5143 in g_vasprintf (/usr/lib/libglib-2.0.so.0+0xb5143) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) #3 0x7fb1837b44d3 in g_strdup_vprintf (/usr/lib/libglib-2.0.so.0+0x844d3) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#4 0x7fb183774826 in g_error_new_valist (/usr/lib/libglib-2.0.so.0+0x44826) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#5 0x7fb183774a81 in g_set_error (/usr/lib/libglib-2.0.so.0+0x44a81) (BuildId: 443a4c4d7f48705038d59e3f6135a025298de9b9) rauc#6 0x55c569403615 in r_nbd_run_server ../src/nbd.c:943 rauc#7 0x55c569327de4 in main ../src/main.c:2984 rauc#8 0x7fb182a0ce07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#9 0x7fb182a0cecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3) rauc#10 0x55c5692eed14 in _start (/home/gportay/src/rauc/build/rauc+0x17ad14) (BuildId: fce67367819006bb3a0f97f5d3784a86063668bf) SUMMARY: AddressSanitizer: 53 byte(s) leaked in 2 allocation(s). Signed-off-by: Gaël PORTAY <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.